package com.example.springboot.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.filter.HiddenHttpMethodFilter;

/**
 * @author by Mr. Li 2021/1/29 22:07
 */
@Configuration
public class MyRequestConfig {

    private final static String METHOD_PARAM = "_G";

    @Bean
    public HiddenHttpMethodFilter hiddenHttpMethodFilter() {
        final HiddenHttpMethodFilter hiddenHttpMethodFilter = new HiddenHttpMethodFilter();
        hiddenHttpMethodFilter.setMethodParam(METHOD_PARAM);

        return hiddenHttpMethodFilter;
    }
}
